﻿using System.Collections.Generic;
using System.Data;
using Model;
using System;

namespace IDAL
{
    public interface IAging
    {
        bool AgingAndItem_Insert(AgingInfo ai, DataTable dt);
        bool Aging_Insert(AgingInfo ai);//已经被代替的函数
        bool Aging_InBoxManu(string agingID, string deviceName, string userID);
        bool Aging_InBoxQual(string agingID, string userID, int amount);
        bool Aging_TempStartManu(string agingID, string userID);
        bool Aging_TempStartQual(string agingID, string userID);
        bool Aging_PatrolManu(string agingID, string userID);
        bool Aging_PatrolQual(string agingID, string userID);
        bool Aging_TempEndManu(string agingID, string userID);
        bool Aging_TempEndQual(string agingID, string userID, int amount);

        bool Aging_ExistsID(string agingID);
        bool Aging_ExistsValidID(string agingID);
        string Aging_IsSecondAgingOK(DataTable dt);
        string Aging_HasValidPostStep(string productTypeID, DataTable dt);
        AgingInfo GetbyAgingID(string agingID);
        AgingInfo GetbyDeviceName(string deviceName);
        IList<string> GetIDsbyDeviceName(string deviceName,DateTime dt);
        AgingInfo GetAging_InBox(string agingID);
        IList<AgingInfo> GetLatestAgings();
        IList<AgingInfo> GetAgingsbyDT(DateTime starttime, DateTime stoptime);
        IList<AgingInfo> GetAgingsbySN(string productSN);
        IList<AgingInfo> GetPassAgingsbySN(string productSN);
        string GetIDbySN(string productSN, string agingStep);
    }
}
